package com.cy.pj.sys.dao;


import com.cy.pj.sys.entity.SysLog;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;


/**
 * @author zimin
 * @create 2019-07-08 9:36
 */
@Mapper
public interface SysLogDao {
    /**
     * @param username
     * @param startIndex
     * @param pageSize
     * @return
     */
    List<SysLog> findPageObjects(
            @Param("username") String username,
            @Param("startIndex") Integer startIndex,
            @Param("pageSize") Integer pageSize
    );

    /**
     * @param username
     * @return
     */
    int getRowCount(
            @Param("username") String username
    );


    @Delete("delete from sys_logs where id = #{ids}")
//    int deleteObject(Integer id);

    int deleteObject(@Param("ids") Integer... ids);
}
